<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>call4</title>
</head>
<body>
<h3>demo4</h3>

<script>
    var name = '笑笑';
    var age  = 17;
    var obj = {
    	name:'打打',
        objAge:this.age, // 指向上一级作用域 window ，对象不形成作用域
        myFun:function(){
    		console.log(this.name + '年龄' + this.age);
        }
    }
    console.log(obj.objAge) //17
    obj.myFun() // 打打年龄undefined
    var fav = '大爷';
    function showf(){
    	console.log(this.fav)
    }
    showf();// 大爷
</script>
</body>
</html>
